﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hospital.BLL.IBLL;
using Hospital.Dao.IDao;

namespace Hospital.BLL.BLLImpl
{
    public class AnnouncementServiceImpl : IAnnouncementService
    {
        #region Member
        private IAnnouncementDao announcementDao;
        #endregion

        #region Property
        public IAnnouncementDao AnnouncementDao
        {
            set { announcementDao = value; }
            get { return announcementDao; }
        }
        #endregion

        #region IAnnouncementService 成员

        public IList<Hospital.Model.Announcement> GetAnnouncement(int iCount)
        {
            return announcementDao.GetAnnouncement(iCount);
        }

        public Hospital.Model.Announcement GetAnnouncementById(Guid Id)
        {
            return announcementDao.GetAnnouncementById(Id);
        }

        public bool DeleteAnnouncementById(Guid Id)
        {
            Hospital.Model.Announcement announce = announcementDao.GetAnnouncementById(Id);
            return announcementDao.DeleteAnnouncement(announce);
        }
        #endregion
    }
}
